import nock from "nock";
import type { SourcifyChain } from "@ethereum-sourcify/lib-sourcify";

export const mockEtherscanApi = (
  sourcifyChain: SourcifyChain,
  contractAddress: string,
  response: any,
  userApiKey?: string,
): nock.Scope => {
  if (!sourcifyChain.etherscanApi?.supported) {
    chai.assert.fail(
      `Etherscan for chain ${sourcifyChain.chainId} not configured`,
    );
  }
  const apiKey =
    userApiKey !== undefined
      ? userApiKey
      : process.env[sourcifyChain.etherscanApi.apiKeyEnvName || ""] ||
        process.env.ETHERSCAN_API_KEY ||
        "";
  return nock("https://api.etherscan.io/v2")
    .get(
      `/api?chainid=${sourcifyChain.chainId}&module=contract&action=getsourcecode&address=${contractAddress}&apikey=${apiKey}`,
    )
    .reply(function () {
      return [200, response];
    });
};

export const UNVERIFIED_CONTRACT_RESPONSE = {
  status: "1",
  message: "OK",
  result: [
    {
      SourceCode: "",
      ABI: "Contract source code not verified",
      ContractName: "",
      CompilerVersion: "",
      OptimizationUsed: "",
      Runs: "",
      ConstructorArguments: "",
      EVMVersion: "Default",
      Library: "",
      LicenseType: "Unknown",
      Proxy: "0",
      Implementation: "",
      SwarmSource: "",
    },
  ],
};

export const INVALID_API_KEY_RESPONSE = {
  status: "0",
  message: "NOTOK",
  result: "Invalid API Key",
};

export const RATE_LIMIT_REACHED_RESPONSE = {
  status: "0",
  message: "NOTOK",
  result: "Max rate limit reached, please use API Key for higher rate limit",
};

export const SOLC_1_1_CONTRACT_RESPONSE = {
  status: "1",
  message: "OK",
  result: [
    {
      SourceCode:
        "contract FirstCoin {\r\n    mapping (address => uint) public coinBalanceOf;\r\n\r\n    event CoinTransfer(address sender, address receiver, uint amount);\r\n\r\n    function FirstCoin(uint supply) {\r\n        coinBalanceOf[msg.sender] = 1000000;\r\n    }\r\n\r\n    function sendCoin(address receiver, uint amount) returns(bool sufficient) {\r\n        if (coinBalanceOf[msg.sender] < amount) {\r\n            return false;\r\n        }\r\n        coinBalanceOf[msg.sender] -= amount;\r\n        coinBalanceOf[receiver] += amount;\r\n        CoinTransfer(msg.sender, receiver, amount);\r\n        return true;\r\n    } \r\n}",
      ABI: '[{"constant":false,"inputs":[{"name":"receiver","type":"address"},{"name":"amount","type":"uint256"}],"name":"sendCoin","outputs":[{"name":"sufficient","type":"bool"}],"type":"function","payable":true,"stateMutability":"payable"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"coinBalanceOf","outputs":[{"name":"","type":"uint256"}],"type":"function","stateMutability":"view","payable":false},{"inputs":[{"name":"supply","type":"uint256"}],"type":"constructor","payable":true,"stateMutability":"payable"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sender","type":"address"},{"indexed":false,"name":"receiver","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"CoinTransfer","type":"event"},{"type":"fallback","payable":true,"stateMutability":"payable"}]',
      ContractName: "FirstCoin",
      CompilerVersion: "v0.1.1+commit.6ff4cd6",
      CompilerType: "solc",
      OptimizationUsed: "0",
      Runs: "200",
      ConstructorArguments: "",
      EVMVersion: "Default",
      Library: "",
      ContractFileName: "",
      LicenseType: "",
      Proxy: "0",
      Implementation: "",
      SwarmSource: "",
      SimilarMatch: "0x8374f5CC22eDA52e960D9558fb48DD4b7946609a",
    },
  ],
};

export const SINGLE_CONTRACT_RESPONSE = {
  status: "1",
  message: "OK",
  result: [
    {
      SourceCode:
        '// SPDX-License-Identifier: Apache-2.0\n\n/// @title Hemispheres by Joey L\n/// @author transientlabs.xyz\n\npragma solidity 0.8.17;\n\n/// @title TLCoreCreator.sol\n/// @notice Transient Labs Core Creator Contract\n/// @dev this works for either ERC721TL or ERC1155TL contracts, just need to change the implementation\n/// @author transientlabs.xyz\n\n/*\n    ____        _ __    __   ____  _ ________                     __ \n   / __ )__  __(_) /___/ /  / __ \\(_) __/ __/__  ________  ____  / /_\n  / __  / / / / / / __  /  / / / / / /_/ /_/ _ \\/ ___/ _ \\/ __ \\/ __/\n / /_/ / /_/ / / / /_/ /  / /_/ / / __/ __/  __/ /  /  __/ / / / /__ \n/_____/\\__,_/_/_/\\__,_/  /_____/_/_/ /_/  \\___/_/   \\___/_/ /_/\\__(_)*/\n\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n    /**\n     * @dev Delegates the current call to `implementation`.\n     *\n     * This function does not return to its internal call site, it will return directly to the external caller.\n     */\n    function _delegate(address implementation) internal virtual {\n        assembly {\n            // Copy msg.data. We take full control of memory in this inline assembly\n            // block because it will not return to Solidity code. We overwrite the\n            // Solidity scratch pad at memory position 0.\n            calldatacopy(0, 0, calldatasize())\n\n            // Call the implementation.\n            // out and outsize are 0 because we don\'t know the size yet.\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n            // Copy the returned data.\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            // delegatecall returns 0 on error.\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n\n    /**\n     * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n     * and {_fallback} should delegate.\n     */\n    function _implementation() internal view virtual returns (address);\n\n    /**\n     * @dev Delegates the current call to the address returned by `_implementation()`.\n     *\n     * This function does not return to its internal call site, it will return directly to the external caller.\n     */\n    function _fallback() internal virtual {\n        _beforeFallback();\n        _delegate(_implementation());\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n     * function in the contract matches the call data.\n     */\n    fallback() external payable virtual {\n        _fallback();\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n     * is empty.\n     */\n    receive() external payable virtual {\n        _fallback();\n    }\n\n    /**\n     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n     * call, or as part of the Solidity `fallback` or `receive` functions.\n     *\n     * If overridden should call `super._beforeFallback()`.\n     */\n    function _beforeFallback() internal virtual {}\n}\n\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {BeaconProxy} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n    /**\n     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n     * address.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy.\n     */\n    function proxiableUUID() external view returns (bytes32);\n}\n\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn\'t rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity\'s `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, "Address: insufficient balance");\n\n        (bool success, ) = recipient.call{value: amount}("");\n        require(success, "Address: unable to send value, recipient may have reverted");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, "Address: low-level call failed");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, "Address: insufficient balance for call");\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, "Address: low-level static call failed");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, "Address: low-level delegate call failed");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n     *\n     * _Available since v4.8._\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        if (success) {\n            if (returndata.length == 0) {\n                // only check isContract if the call was successful and the return data is empty\n                // otherwise we already know that it was a contract\n                require(isContract(target), "Address: call to non-contract");\n            }\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn\'t, either by bubbling the\n     * revert reason or using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert(errorMessage);\n        }\n    }\n}\n\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n}\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1\n    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _getImplementation() internal view returns (address) {\n        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Perform implementation upgrade\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeTo(address newImplementation) internal {\n        _setImplementation(newImplementation);\n        emit Upgraded(newImplementation);\n    }\n\n    /**\n     * @dev Perform implementation upgrade with additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCall(\n        address newImplementation,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        _upgradeTo(newImplementation);\n        if (data.length > 0 || forceCall) {\n            Address.functionDelegateCall(newImplementation, data);\n        }\n    }\n\n    /**\n     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCallUUPS(\n        address newImplementation,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        // Upgrades from old implementations will perform a rollback test. This test requires the new\n        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n        // this special case will break upgrade paths from old UUPS implementation to new ones.\n        if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n            _setImplementation(newImplementation);\n        } else {\n            try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n                require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");\n            } catch {\n                revert("ERC1967Upgrade: new implementation is not UUPS");\n            }\n            _upgradeToAndCall(newImplementation, data, forceCall);\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Returns the current admin.\n     */\n    function _getAdmin() internal view returns (address) {\n        return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        require(newAdmin != address(0), "ERC1967: new admin is the zero address");\n        StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {AdminChanged} event.\n     */\n    function _changeAdmin(address newAdmin) internal {\n        emit AdminChanged(_getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is bytes32(uint256(keccak256(\'eip1967.proxy.beacon\')) - 1)) and is validated in the constructor.\n     */\n    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Emitted when the beacon is upgraded.\n     */\n    event BeaconUpgraded(address indexed beacon);\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function _getBeacon() internal view returns (address) {\n        return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the EIP1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");\n        require(\n            Address.isContract(IBeacon(newBeacon).implementation()),\n            "ERC1967: beacon implementation is not a contract"\n        );\n        StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n    }\n\n    /**\n     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n     *\n     * Emits a {BeaconUpgraded} event.\n     */\n    function _upgradeBeaconToAndCall(\n        address newBeacon,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        _setBeacon(newBeacon);\n        emit BeaconUpgraded(newBeacon);\n        if (data.length > 0 || forceCall) {\n            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n        }\n    }\n}\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn\'t conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n    /**\n     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n     *\n     * If `_data` is nonempty, it\'s used as data in a delegate call to `_logic`. This will typically be an encoded\n     * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n     */\n    constructor(address _logic, bytes memory _data) payable {\n        _upgradeToAndCall(_logic, _data, false);\n    }\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _implementation() internal view virtual override returns (address impl) {\n        return ERC1967Upgrade._getImplementation();\n    }\n}\n\n/*//////////////////////////////////////////////////////////////////////////\n                            TLCoreCreator\n//////////////////////////////////////////////////////////////////////////*/\n\ncontract TLCreator is ERC1967Proxy {\n\n    /// @param name: the name of the contract\n    /// @param symbol: the symbol of the contract\n    /// @param defaultRoyaltyRecipient: the default address for royalty payments\n    /// @param defaultRoyaltyPercentage: the default royalty percentage of basis points (out of 10,000)\n    /// @param initOwner: initial owner of the contract\n    /// @param admins: array of admin addresses to add to the contract\n    /// @param enableStory: a bool deciding whether to add story fuctionality or not\n    /// @param blockListRegistry: address of the blocklist registry to use\n    constructor(\n        address implementation,\n        string memory name,\n        string memory symbol,\n        address defaultRoyaltyRecipient,\n        uint256 defaultRoyaltyPercentage,\n        address initOwner,\n        address[] memory admins,\n        bool enableStory,\n        address blockListRegistry\n    )\n        ERC1967Proxy(\n            implementation,\n            abi.encodeWithSelector(\n                0x1fbd2402, // selector for "initialize(string,string,address,uint256,address,address[],bool,address)"\n                name,\n                symbol,\n                defaultRoyaltyRecipient,\n                defaultRoyaltyPercentage,\n                initOwner,\n                admins,\n                enableStory,\n                blockListRegistry\n            )\n        )\n    {}\n}\n\ncontract Hemispheres is TLCreator {\n\n    constructor(\n        string memory name,\n        string memory symbol,\n        address defaultRoyaltyRecipient,\n        uint256 defaultRoyaltyPercentage,\n        address initOwner,\n        address[] memory admins,\n        bool enableStory,\n        address blockListRegistry\n    ) TLCreator(\n        0xFb1647BD77D28d0aCAB0c3632CeEF87E7CD62b04,\n        name,\n        symbol,\n        defaultRoyaltyRecipient,\n        defaultRoyaltyPercentage,\n        initOwner,\n        admins,\n        enableStory,\n        blockListRegistry\n    ) {}\n}\n',
      ABI: '[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"defaultRoyaltyRecipient","type":"address"},{"internalType":"uint256","name":"defaultRoyaltyPercentage","type":"uint256"},{"internalType":"address","name":"initOwner","type":"address"},{"internalType":"address[]","name":"admins","type":"address[]"},{"internalType":"bool","name":"enableStory","type":"bool"},{"internalType":"address","name":"blockListRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]',
      ContractName: "Hemispheres",
      CompilerVersion: "v0.8.17+commit.8df45f5f",
      OptimizationUsed: "1",
      Runs: "2000",
      ConstructorArguments:
        "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000007ee3acaccc605e4de444ec630083f739b3a73d6e00000000000000000000000000000000000000000000000000000000000003e80000000000000000000000007ee3acaccc605e4de444ec630083f739b3a73d6e000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b48454d4953504845524553000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000448454d4900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000072dbe00de00edf158aebee2c82b7e2f19a8c19a8",
      EVMVersion: "Default",
      Library: "",
      LicenseType: "",
      Proxy: "1",
      Implementation: "0xfb1647bd77d28d0acab0c3632ceef87e7cd62b04",
      SwarmSource: "",
    },
  ],
};

export const MULTIPLE_CONTRACT_RESPONSE = {
  status: "1",
  message: "OK",
  result: [
    {
      SourceCode:
        '{"Address.sol":{"content":"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly { size := extcodesize(account) }\\n        return size \\u003e 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity\\u0027s `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        require(address(this).balance \\u003e= amount, \\"Address: insufficient balance\\");\\n\\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n        (bool success, ) = recipient.call{ value: amount }(\\"\\");\\n        require(success, \\"Address: unable to send value, recipient may have reverted\\");\\n    }\\n\\n    /**\\n     * @dev Performs a Solidity function call using a low level `call`. A\\n     * plain`call` is an unsafe replacement for a function call: use this\\n     * function instead.\\n     *\\n     * If `target` reverts with a revert reason, it is bubbled up by this\\n     * function (like regular Solidity function calls).\\n     *\\n     * Returns the raw returned data. To convert to the expected return value,\\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n     *\\n     * Requirements:\\n     *\\n     * - `target` must be a contract.\\n     * - calling `target` with `data` must not revert.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n      return functionCall(target, data, \\"Address: low-level call failed\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n     * `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but also transferring `value` wei to `target`.\\n     *\\n     * Requirements:\\n     *\\n     * - the calling contract must have an ETH balance of at least `value`.\\n     * - the called Solidity function must be `payable`.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, value, \\"Address: low-level call with value failed\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n        require(address(this).balance \\u003e= value, \\"Address: insufficient balance for call\\");\\n        require(isContract(target), \\"Address: call to non-contract\\");\\n\\n        // solhint-disable-next-line avoid-low-level-calls\\n        (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n        return _verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n        return functionStaticCall(target, data, \\"Address: low-level static call failed\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n        require(isContract(target), \\"Address: static call to non-contract\\");\\n\\n        // solhint-disable-next-line avoid-low-level-calls\\n        (bool success, bytes memory returndata) = target.staticcall(data);\\n        return _verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionDelegateCall(target, data, \\"Address: low-level delegate call failed\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n        require(isContract(target), \\"Address: delegate call to non-contract\\");\\n\\n        // solhint-disable-next-line avoid-low-level-calls\\n        (bool success, bytes memory returndata) = target.delegatecall(data);\\n        return _verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n        if (success) {\\n            return returndata;\\n        } else {\\n            // Look for revert reason and bubble it up if present\\n            if (returndata.length \\u003e 0) {\\n                // The easiest way to bubble the revert reason is using memory via assembly\\n\\n                // solhint-disable-next-line no-inline-assembly\\n                assembly {\\n                    let returndata_size := mload(returndata)\\n                    revert(add(32, returndata), returndata_size)\\n                }\\n            } else {\\n                revert(errorMessage);\\n            }\\n        }\\n    }\\n}\\n"},"Context.sol":{"content":"// SPDX-License-Identifier: MIT\\n\\npragma solidity \\u003e=0.6.0 \\u003c0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n    function _msgSender() internal view virtual returns (address payable) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes memory) {\\n        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n        return msg.data;\\n    }\\n}\\n"},"Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\"./Context.sol\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n    address private _owner;\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the deployer as the initial owner.\\n     */\\n    constructor () {\\n        address msgSender = _msgSender();\\n        _owner = msgSender;\\n        emit OwnershipTransferred(address(0), msgSender);\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        require(owner() == _msgSender(), \\"Ownable: caller is not the owner\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby removing any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        emit OwnershipTransferred(_owner, address(0));\\n        _owner = address(0);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        require(newOwner != address(0), \\"Ownable: new owner is the zero address\\");\\n        emit OwnershipTransferred(_owner, newOwner);\\n        _owner = newOwner;\\n    }\\n}\\n"},"Proxy.sol":{"content":"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n    /**\\n     * @dev Delegates the current call to `implementation`.\\n     *\\n     * This function does not return to its internall call site, it will return directly to the external caller.\\n     */\\n    function _delegate(address implementation) internal virtual {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // Copy msg.data. We take full control of memory in this inline assembly\\n            // block because it will not return to Solidity code. We overwrite the\\n            // Solidity scratch pad at memory position 0.\\n            calldatacopy(0, 0, calldatasize())\\n\\n            // Call the implementation.\\n            // out and outsize are 0 because we don\\u0027t know the size yet.\\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n            // Copy the returned data.\\n            returndatacopy(0, 0, returndatasize())\\n\\n            switch result\\n            // delegatecall returns 0 on error.\\n            case 0 { revert(0, returndatasize()) }\\n            default { return(0, returndatasize()) }\\n        }\\n    }\\n\\n    /**\\n     * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n     * and {_fallback} should delegate.\\n     */\\n    function _implementation() internal view virtual returns (address);\\n\\n    /**\\n     * @dev Delegates the current call to the address returned by `_implementation()`.\\n     *\\n     * This function does not return to its internall call site, it will return directly to the external caller.\\n     */\\n    function _fallback() internal virtual {\\n        _beforeFallback();\\n        _delegate(_implementation());\\n    }\\n\\n    /**\\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n     * function in the contract matches the call data.\\n     */\\n    fallback () external payable virtual {\\n        _fallback();\\n    }\\n\\n    /**\\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n     * is empty.\\n     */\\n    receive () external payable virtual {\\n        _fallback();\\n    }\\n\\n    /**\\n     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n     * call, or as part of the Solidity `fallback` or `receive` functions.\\n     *\\n     * If overriden should call `super._beforeFallback()`.\\n     */\\n    function _beforeFallback() internal virtual {\\n    }\\n}\\n"},"ProxyAdmin.sol":{"content":"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\"./Ownable.sol\\";\\nimport \\"./TransparentUpgradeableProxy.sol\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n\\n    /**\\n     * @dev Returns the current implementation of `proxy`.\\n     *\\n     * Requirements:\\n     *\\n     * - This contract must be the admin of `proxy`.\\n     */\\n    function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n        // We need to manually run the static call since the getter cannot be flagged as view\\n        // bytes4(keccak256(\\"implementation()\\")) == 0x5c60da1b\\n        (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\"5c60da1b\\");\\n        require(success);\\n        return abi.decode(returndata, (address));\\n    }\\n\\n    /**\\n     * @dev Returns the current admin of `proxy`.\\n     *\\n     * Requirements:\\n     *\\n     * - This contract must be the admin of `proxy`.\\n     */\\n    function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n        // We need to manually run the static call since the getter cannot be flagged as view\\n        // bytes4(keccak256(\\"admin()\\")) == 0xf851a440\\n        (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\"f851a440\\");\\n        require(success);\\n        return abi.decode(returndata, (address));\\n    }\\n\\n    /**\\n     * @dev Changes the admin of `proxy` to `newAdmin`.\\n     *\\n     * Requirements:\\n     *\\n     * - This contract must be the current admin of `proxy`.\\n     */\\n    function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n        proxy.changeAdmin(newAdmin);\\n    }\\n\\n    /**\\n     * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n     *\\n     * Requirements:\\n     *\\n     * - This contract must be the admin of `proxy`.\\n     */\\n    function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n        proxy.upgradeTo(implementation);\\n    }\\n\\n    /**\\n     * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n     * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n     *\\n     * Requirements:\\n     *\\n     * - This contract must be the admin of `proxy`.\\n     */\\n    function upgradeAndCall(TransparentUpgradeableProxy proxy, address implementation, bytes memory data) public payable virtual onlyOwner {\\n        proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n    }\\n}\\n"},"TransparentUpgradeableProxy.sol":{"content":"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\"./UpgradeableProxy.sol\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\"admin cannot fallback to proxy target\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it\\u0027s best if it\\u0027s a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is UpgradeableProxy {\\n    /**\\n     * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n     * optionally initialized with `_data` as explained in {UpgradeableProxy-constructor}.\\n     */\\n    constructor(address _logic, address admin_, bytes memory _data) payable UpgradeableProxy(_logic, _data) {\\n        assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\"eip1967.proxy.admin\\")) - 1));\\n        _setAdmin(admin_);\\n    }\\n\\n    /**\\n     * @dev Emitted when the admin account has changed.\\n     */\\n    event AdminChanged(address previousAdmin, address newAdmin);\\n\\n    /**\\n     * @dev Storage slot with the admin of the contract.\\n     * This is the keccak-256 hash of \\"eip1967.proxy.admin\\" subtracted by 1, and is\\n     * validated in the constructor.\\n     */\\n    bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n    /**\\n     * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n     */\\n    modifier ifAdmin() {\\n        if (msg.sender == _admin()) {\\n            _;\\n        } else {\\n            _fallback();\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the current admin.\\n     *\\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n     *\\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n     */\\n    function admin() external ifAdmin returns (address admin_) {\\n        admin_ = _admin();\\n    }\\n\\n    /**\\n     * @dev Returns the current implementation.\\n     *\\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n     *\\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n     * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n     */\\n    function implementation() external ifAdmin returns (address implementation_) {\\n        implementation_ = _implementation();\\n    }\\n\\n    /**\\n     * @dev Changes the admin of the proxy.\\n     *\\n     * Emits an {AdminChanged} event.\\n     *\\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n     */\\n    function changeAdmin(address newAdmin) external virtual ifAdmin {\\n        require(newAdmin != address(0), \\"TransparentUpgradeableProxy: new admin is the zero address\\");\\n        emit AdminChanged(_admin(), newAdmin);\\n        _setAdmin(newAdmin);\\n    }\\n\\n    /**\\n     * @dev Upgrade the implementation of the proxy.\\n     *\\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n     */\\n    function upgradeTo(address newImplementation) external virtual ifAdmin {\\n        _upgradeTo(newImplementation);\\n    }\\n\\n    /**\\n     * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n     * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n     * proxied contract.\\n     *\\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n     */\\n    function upgradeToAndCall(address newImplementation, bytes calldata data) external payable virtual ifAdmin {\\n        _upgradeTo(newImplementation);\\n        Address.functionDelegateCall(newImplementation, data);\\n    }\\n\\n    /**\\n     * @dev Returns the current admin.\\n     */\\n    function _admin() internal view virtual returns (address adm) {\\n        bytes32 slot = _ADMIN_SLOT;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            adm := sload(slot)\\n        }\\n    }\\n\\n    /**\\n     * @dev Stores a new address in the EIP1967 admin slot.\\n     */\\n    function _setAdmin(address newAdmin) private {\\n        bytes32 slot = _ADMIN_SLOT;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            sstore(slot, newAdmin)\\n        }\\n    }\\n\\n    /**\\n     * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n     */\\n    function _beforeFallback() internal virtual override {\\n        require(msg.sender != _admin(), \\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\");\\n        super._beforeFallback();\\n    }\\n}\\n"},"UpgradeableProxy.sol":{"content":"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\"./Proxy.sol\\";\\nimport \\"./Address.sol\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn\\u0027t conflict with the storage layout of the\\n * implementation behind the proxy.\\n *\\n * Upgradeability is only provided internally through {_upgradeTo}. For an externally upgradeable proxy see\\n * {TransparentUpgradeableProxy}.\\n */\\ncontract UpgradeableProxy is Proxy {\\n    /**\\n     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n     *\\n     * If `_data` is nonempty, it\\u0027s used as data in a delegate call to `_logic`. This will typically be an encoded\\n     * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n     */\\n    constructor(address _logic, bytes memory _data) payable {\\n        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\"eip1967.proxy.implementation\\")) - 1));\\n        _setImplementation(_logic);\\n        if(_data.length \\u003e 0) {\\n            Address.functionDelegateCall(_logic, _data);\\n        }\\n    }\\n\\n    /**\\n     * @dev Emitted when the implementation is upgraded.\\n     */\\n    event Upgraded(address indexed implementation);\\n\\n    /**\\n     * @dev Storage slot with the address of the current implementation.\\n     * This is the keccak-256 hash of \\"eip1967.proxy.implementation\\" subtracted by 1, and is\\n     * validated in the constructor.\\n     */\\n    bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n    /**\\n     * @dev Returns the current implementation address.\\n     */\\n    function _implementation() internal view virtual override returns (address impl) {\\n        bytes32 slot = _IMPLEMENTATION_SLOT;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            impl := sload(slot)\\n        }\\n    }\\n\\n    /**\\n     * @dev Upgrades the proxy to a new implementation.\\n     *\\n     * Emits an {Upgraded} event.\\n     */\\n    function _upgradeTo(address newImplementation) internal virtual {\\n        _setImplementation(newImplementation);\\n        emit Upgraded(newImplementation);\\n    }\\n\\n    /**\\n     * @dev Stores a new address in the EIP1967 implementation slot.\\n     */\\n    function _setImplementation(address newImplementation) private {\\n        require(Address.isContract(newImplementation), \\"UpgradeableProxy: new implementation is not a contract\\");\\n\\n        bytes32 slot = _IMPLEMENTATION_SLOT;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            sstore(slot, newImplementation)\\n        }\\n    }\\n}\\n"}}',
      ABI: '[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"},{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeProxyAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"}],"name":"getProxyAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"}],"name":"getProxyImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"},{"internalType":"address","name":"implementation","type":"address"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract TransparentUpgradeableProxy","name":"proxy","type":"address"},{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeAndCall","outputs":[],"stateMutability":"payable","type":"function"}]',
      ContractName: "ProxyAdmin",
      ContractFileName: "ProxyAdmin.sol",
      CompilerVersion: "v0.7.4+commit.3f05b770",
      OptimizationUsed: "0",
      Runs: "200",
      ConstructorArguments: "",
      EVMVersion: "Default",
      Library: "",
      LicenseType: "MIT",
      Proxy: "0",
      Implementation: "",
      SwarmSource:
        "ipfs://44c29b7df610315a76f07ae049bc52885c90b2e1cd582c6b6bd75aa4b0711cfe",
    },
  ],
};

export const STANDARD_JSON_CONTRACT_RESPONSE = {
  status: "1",
  message: "OK",
  result: [
    {
      SourceCode:
        '{{\r\n  "language": "Solidity",\r\n  "sources": {\r\n    "contracts/dependencies/open-zeppelin/Address.sol": {\r\n      "content": "// SPDX-License-Identifier: MIT\\npragma solidity 0.7.5;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n  /**\\n   * @dev Returns true if `account` is a contract.\\n   *\\n   * [IMPORTANT]\\n   * ====\\n   * It is unsafe to assume that an address for which this function returns\\n   * false is an externally-owned account (EOA) and not a contract.\\n   *\\n   * Among others, `isContract` will return false for the following\\n   * types of addresses:\\n   *\\n   *  - an externally-owned account\\n   *  - a contract in construction\\n   *  - an address where a contract will be created\\n   *  - an address where a contract lived, but was destroyed\\n   * ====\\n   */\\n  function isContract(address account) internal view returns (bool) {\\n    // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\\n    // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\\n    // for accounts without code, i.e. `keccak256(\'\')`\\n    bytes32 codehash;\\n    bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n    // solhint-disable-next-line no-inline-assembly\\n    assembly {\\n      codehash := extcodehash(account)\\n    }\\n    return (codehash != accountHash && codehash != 0x0);\\n  }\\n\\n  /**\\n   * @dev Replacement for Solidity\'s `transfer`: sends `amount` wei to\\n   * `recipient`, forwarding all available gas and reverting on errors.\\n   *\\n   * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n   * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n   * imposed by `transfer`, making them unable to receive funds via\\n   * `transfer`. {sendValue} removes this limitation.\\n   *\\n   * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n   *\\n   * IMPORTANT: because control is transferred to `recipient`, care must be\\n   * taken to not create reentrancy vulnerabilities. Consider using\\n   * {ReentrancyGuard} or the\\n   * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n   */\\n  function sendValue(address payable recipient, uint256 amount) internal {\\n    require(address(this).balance >= amount, \'Address: insufficient balance\');\\n\\n    // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n    (bool success, ) = recipient.call{value: amount}(\'\');\\n    require(success, \'Address: unable to send value, recipient may have reverted\');\\n  }\\n}\\n"\r\n    },\r\n    "contracts/dependencies/open-zeppelin/BaseUpgradeabilityProxy.sol": {\r\n      "content": "// SPDX-License-Identifier: MIT\\npragma solidity 0.7.5;\\n\\nimport \'./Proxy.sol\';\\nimport \'./Address.sol\';\\n\\n/**\\n * @title BaseUpgradeabilityProxy\\n * @dev This contract implements a proxy that allows to change the\\n * implementation address to which it will delegate.\\n * Such a change is called an implementation upgrade.\\n */\\ncontract BaseUpgradeabilityProxy is Proxy {\\n  /**\\n   * @dev Emitted when the implementation is upgraded.\\n   * @param implementation Address of the new implementation.\\n   */\\n  event Upgraded(address indexed implementation);\\n\\n  /**\\n   * @dev Storage slot with the address of the current implementation.\\n   * This is the keccak-256 hash of \\"eip1967.proxy.implementation\\" subtracted by 1, and is\\n   * validated in the constructor.\\n   */\\n  bytes32\\n    internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n  /**\\n   * @dev Returns the current implementation.\\n   * @return impl Address of the current implementation\\n   */\\n  function _implementation() internal override view returns (address impl) {\\n    bytes32 slot = IMPLEMENTATION_SLOT;\\n    assembly {\\n      impl := sload(slot)\\n    }\\n  }\\n\\n  /**\\n   * @dev Upgrades the proxy to a new implementation.\\n   * @param newImplementation Address of the new implementation.\\n   */\\n  function _upgradeTo(address newImplementation) internal {\\n    _setImplementation(newImplementation);\\n    emit Upgraded(newImplementation);\\n  }\\n\\n  /**\\n   * @dev Sets the implementation address of the proxy.\\n   * @param newImplementation Address of the new implementation.\\n   */\\n  function _setImplementation(address newImplementation) internal {\\n    require(\\n      Address.isContract(newImplementation),\\n      \'Cannot set a proxy implementation to a non-contract address\'\\n    );\\n\\n    bytes32 slot = IMPLEMENTATION_SLOT;\\n\\n    assembly {\\n      sstore(slot, newImplementation)\\n    }\\n  }\\n}\\n"\r\n    },\r\n    "contracts/dependencies/open-zeppelin/Proxy.sol": {\r\n      "content": "// SPDX-License-Identifier: MIT\\npragma solidity 0.7.5;\\n\\n/**\\n * @title Proxy\\n * @dev Implements delegation of calls to other contracts, with proper\\n * forwarding of return values and bubbling of failures.\\n * It defines a fallback function that delegates all calls to the address\\n * returned by the abstract _implementation() internal function.\\n */\\nabstract contract Proxy {\\n  /**\\n   * @dev Fallback function.\\n   * Implemented entirely in `_fallback`.\\n   */\\n  fallback() external payable {\\n    _fallback();\\n  }\\n\\n  /**\\n   * @return The Address of the implementation.\\n   */\\n  function _implementation() internal virtual view returns (address);\\n\\n  /**\\n   * @dev Delegates execution to an implementation contract.\\n   * This is a low level function that doesn\'t return to its internal call site.\\n   * It will return to the external caller whatever the implementation returns.\\n   * @param implementation Address to delegate.\\n   */\\n  function _delegate(address implementation) internal {\\n    assembly {\\n      // Copy msg.data. We take full control of memory in this inline assembly\\n      // block because it will not return to Solidity code. We overwrite the\\n      // Solidity scratch pad at memory position 0.\\n      calldatacopy(0, 0, calldatasize())\\n\\n      // Call the implementation.\\n      // out and outsize are 0 because we don\'t know the size yet.\\n      let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n      // Copy the returned data.\\n      returndatacopy(0, 0, returndatasize())\\n\\n      switch result\\n        // delegatecall returns 0 on error.\\n        case 0 {\\n          revert(0, returndatasize())\\n        }\\n        default {\\n          return(0, returndatasize())\\n        }\\n    }\\n  }\\n\\n  /**\\n   * @dev Function that is run as the first thing in the fallback function.\\n   * Can be redefined in derived contracts to add functionality.\\n   * Redefinitions must call super._willFallback().\\n   */\\n  function _willFallback() internal virtual {}\\n\\n  /**\\n   * @dev fallback implementation.\\n   * Extracted to enable manual triggering.\\n   */\\n  function _fallback() internal {\\n    _willFallback();\\n    _delegate(_implementation());\\n  }\\n}\\n"\r\n    },\r\n    "contracts/dependencies/open-zeppelin/InitializableUpgradeabilityProxy.sol": {\r\n      "content": "// SPDX-License-Identifier: AGPL-3.0\\npragma solidity 0.7.5;\\n\\nimport \'./BaseUpgradeabilityProxy.sol\';\\n\\n/**\\n * @title InitializableUpgradeabilityProxy\\n * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing\\n * implementation and init data.\\n */\\ncontract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy {\\n  /**\\n   * @dev Contract initializer.\\n   * @param _logic Address of the initial implementation.\\n   * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.\\n   * It should include the signature and the parameters of the function to be called, as described in\\n   * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.\\n   * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.\\n   */\\n  function initialize(address _logic, bytes memory _data) public payable {\\n    require(_implementation() == address(0));\\n    assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\'eip1967.proxy.implementation\')) - 1));\\n    _setImplementation(_logic);\\n    if (_data.length > 0) {\\n      (bool success, ) = _logic.delegatecall(_data);\\n      require(success);\\n    }\\n  }\\n}\\n"\r\n    },\r\n    "contracts/dependencies/open-zeppelin/InitializableAdminUpgradeabilityProxy.sol": {\r\n      "content": "// SPDX-License-Identifier: AGPL-3.0\\n//\\n// Contracts by dYdX Foundation. Individual files are released under different licenses.\\n//\\n// https://dydx.community\\n// https://github.com/dydxfoundation/governance-contracts\\n\\npragma solidity 0.7.5;\\n\\nimport \'./BaseAdminUpgradeabilityProxy.sol\';\\nimport \'./InitializableUpgradeabilityProxy.sol\';\\n\\n/**\\n * @title InitializableAdminUpgradeabilityProxy\\n * @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for\\n * initializing the implementation, admin, and init data.\\n */\\ncontract InitializableAdminUpgradeabilityProxy is\\n  BaseAdminUpgradeabilityProxy,\\n  InitializableUpgradeabilityProxy\\n{\\n  /**\\n   * Contract initializer.\\n   * @param _logic address of the initial implementation.\\n   * @param _admin Address of the proxy administrator.\\n   * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.\\n   * It should include the signature and the parameters of the function to be called, as described in\\n   * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.\\n   * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.\\n   */\\n  function initialize(\\n    address _logic,\\n    address _admin,\\n    bytes memory _data\\n  ) public payable {\\n    require(_implementation() == address(0));\\n    InitializableUpgradeabilityProxy.initialize(_logic, _data);\\n    assert(ADMIN_SLOT == bytes32(uint256(keccak256(\'eip1967.proxy.admin\')) - 1));\\n    _setAdmin(_admin);\\n  }\\n\\n  /**\\n   * @dev Only fall back when the sender is not the admin.\\n   */\\n  function _willFallback() internal override(BaseAdminUpgradeabilityProxy, Proxy) {\\n    BaseAdminUpgradeabilityProxy._willFallback();\\n  }\\n}\\n"\r\n    },\r\n    "contracts/dependencies/open-zeppelin/BaseAdminUpgradeabilityProxy.sol": {\r\n      "content": "// SPDX-License-Identifier: MIT\\npragma solidity 0.7.5;\\n\\nimport \'./UpgradeabilityProxy.sol\';\\n\\n/**\\n * @title BaseAdminUpgradeabilityProxy\\n * @dev This contract combines an upgradeability proxy with an authorization\\n * mechanism for administrative tasks.\\n * All external functions in this contract must be guarded by the\\n * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity\\n * feature proposal that would enable this to be done automatically.\\n */\\ncontract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {\\n  /**\\n   * @dev Emitted when the administration has been transferred.\\n   * @param previousAdmin Address of the previous admin.\\n   * @param newAdmin Address of the new admin.\\n   */\\n  event AdminChanged(address previousAdmin, address newAdmin);\\n\\n  /**\\n   * @dev Storage slot with the admin of the contract.\\n   * This is the keccak-256 hash of \\"eip1967.proxy.admin\\" subtracted by 1, and is\\n   * validated in the constructor.\\n   */\\n\\n  bytes32\\n    internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n  /**\\n   * @dev Modifier to check whether the `msg.sender` is the admin.\\n   * If it is, it will run the function. Otherwise, it will delegate the call\\n   * to the implementation.\\n   */\\n  modifier ifAdmin() {\\n    if (msg.sender == _admin()) {\\n      _;\\n    } else {\\n      _fallback();\\n    }\\n  }\\n\\n  /**\\n   * @return The address of the proxy admin.\\n   */\\n  function admin() external ifAdmin returns (address) {\\n    return _admin();\\n  }\\n\\n  /**\\n   * @return The address of the implementation.\\n   */\\n  function implementation() external ifAdmin returns (address) {\\n    return _implementation();\\n  }\\n\\n  /**\\n   * @dev Changes the admin of the proxy.\\n   * Only the current admin can call this function.\\n   * @param newAdmin Address to transfer proxy administration to.\\n   */\\n  function changeAdmin(address newAdmin) external ifAdmin {\\n    require(newAdmin != address(0), \'Cannot change the admin of a proxy to the zero address\');\\n    emit AdminChanged(_admin(), newAdmin);\\n    _setAdmin(newAdmin);\\n  }\\n\\n  /**\\n   * @dev Upgrade the backing implementation of the proxy.\\n   * Only the admin can call this function.\\n   * @param newImplementation Address of the new implementation.\\n   */\\n  function upgradeTo(address newImplementation) external ifAdmin {\\n    _upgradeTo(newImplementation);\\n  }\\n\\n  /**\\n   * @dev Upgrade the backing implementation of the proxy and call a function\\n   * on the new implementation.\\n   * This is useful to initialize the proxied contract.\\n   * @param newImplementation Address of the new implementation.\\n   * @param data Data to send as msg.data in the low level call.\\n   * It should include the signature and the parameters of the function to be called, as described in\\n   * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.\\n   */\\n  function upgradeToAndCall(address newImplementation, bytes calldata data)\\n    external\\n    payable\\n    ifAdmin\\n  {\\n    _upgradeTo(newImplementation);\\n    (bool success, ) = newImplementation.delegatecall(data);\\n    require(success);\\n  }\\n\\n  /**\\n   * @return adm The admin slot.\\n   */\\n  function _admin() internal view returns (address adm) {\\n    bytes32 slot = ADMIN_SLOT;\\n    assembly {\\n      adm := sload(slot)\\n    }\\n  }\\n\\n  /**\\n   * @dev Sets the address of the proxy admin.\\n   * @param newAdmin Address of the new proxy admin.\\n   */\\n  function _setAdmin(address newAdmin) internal {\\n    bytes32 slot = ADMIN_SLOT;\\n\\n    assembly {\\n      sstore(slot, newAdmin)\\n    }\\n  }\\n\\n  /**\\n   * @dev Only fall back when the sender is not the admin.\\n   */\\n  function _willFallback() internal virtual override {\\n    require(msg.sender != _admin(), \'Cannot call fallback function from the proxy admin\');\\n    super._willFallback();\\n  }\\n}\\n"\r\n    },\r\n    "contracts/dependencies/open-zeppelin/UpgradeabilityProxy.sol": {\r\n      "content": "// SPDX-License-Identifier: MIT\\npragma solidity 0.7.5;\\n\\nimport \'./BaseUpgradeabilityProxy.sol\';\\n\\n/**\\n * @title UpgradeabilityProxy\\n * @dev Extends BaseUpgradeabilityProxy with a constructor for initializing\\n * implementation and init data.\\n */\\ncontract UpgradeabilityProxy is BaseUpgradeabilityProxy {\\n  /**\\n   * @dev Contract constructor.\\n   * @param _logic Address of the initial implementation.\\n   * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.\\n   * It should include the signature and the parameters of the function to be called, as described in\\n   * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.\\n   * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.\\n   */\\n  constructor(address _logic, bytes memory _data) public payable {\\n    assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\'eip1967.proxy.implementation\')) - 1));\\n    _setImplementation(_logic);\\n    if (_data.length > 0) {\\n      (bool success, ) = _logic.delegatecall(_data);\\n      require(success);\\n    }\\n  }\\n}\\n"\r\n    },\r\n    "contracts/dependencies/open-zeppelin/AdminUpgradeabilityProxy.sol": {\r\n      "content": "// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.5;\\n\\nimport \'./BaseAdminUpgradeabilityProxy.sol\';\\n\\n/**\\n * @title AdminUpgradeabilityProxy\\n * @dev Extends from BaseAdminUpgradeabilityProxy with a constructor for\\n * initializing the implementation, admin, and init data.\\n */\\ncontract AdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, UpgradeabilityProxy {\\n  /**\\n   * Contract constructor.\\n   * @param _logic address of the initial implementation.\\n   * @param _admin Address of the proxy administrator.\\n   * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.\\n   * It should include the signature and the parameters of the function to be called, as described in\\n   * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.\\n   * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.\\n   */\\n  constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable {\\n    assert(ADMIN_SLOT == bytes32(uint256(keccak256(\'eip1967.proxy.admin\')) - 1));\\n    _setAdmin(_admin);\\n  }\\n\\n  /**\\n   * @dev Only fall back when the sender is not the admin.\\n   */\\n  function _willFallback() internal override(BaseAdminUpgradeabilityProxy, Proxy) {\\n    require(msg.sender != _admin(), \'Cannot call fallback function from the proxy admin\');\\n    super._willFallback();\\n  }\\n}\\n"\r\n    }\r\n  },\r\n  "settings": {\r\n    "optimizer": {\r\n      "enabled": true,\r\n      "runs": 200\r\n    },\r\n    "evmVersion": "istanbul",\r\n    "outputSelection": {\r\n      "*": {\r\n        "*": [\r\n          "evm.bytecode",\r\n          "evm.deployedBytecode",\r\n          "abi"\r\n        ]\r\n      }\r\n    },\r\n    "libraries": {}\r\n  }\r\n}}',
      ABI: '[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]',
      ContractName: "InitializableAdminUpgradeabilityProxy",
      ContractFileName:
        "contracts/dependencies/open-zeppelin/InitializableAdminUpgradeabilityProxy.sol",
      CompilerVersion: "v0.7.5+commit.eb77ed08",
      OptimizationUsed: "1",
      Runs: "200",
      ConstructorArguments: "",
      EVMVersion: "Default",
      Library: "",
      LicenseType: "",
      Proxy: "1",
      Implementation: "0xbe607a58206180fef691bf1b5ae9670174284388",
      SwarmSource: "",
    },
  ],
};

export const STANDARD_JSON_CONTRACT_EXACT_MATCH_RESPONSE = {
  status: "1",
  message: "OK",
  result: [
    {
      SourceCode:
        '{{\r\n  "language": "Solidity",\r\n  "sources": {\r\n    "contracts/Token.sol": {\r\n      "content": "// SPDX-License-Identifier: MIT\\n\\n/**\\nWebsite: https://lcaiprotocol.org\\nWhitepaper: https://docs.lcaiprotocol.org\\nX: https://x.com/lcaiprotocol\\nTelegram: https://t.me/lcaiprotocol\\n*/\\n\\npragma solidity ^0.8.19;\\n\\naddress constant _deadAddr = address(0xdead);\\n\\nabstract contract Context {\\n    function _msgSender() internal view virtual returns (address) {\\n        return msg.sender;\\n    }\\n}\\n\\ninterface IERC20 {\\n    function totalSupply() external view returns (uint256);\\n\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    function transfer(address recipient, uint256 amount)\\n        external\\n        returns (bool);\\n\\n    function allowance(address owner, address spender)\\n        external\\n        view\\n        returns (uint256);\\n\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n    event Approval(\\n        address indexed owner,\\n        address indexed spender,\\n        uint256 value\\n    );\\n}\\n\\nlibrary SafeMath {\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        require(c >= a, \\"SafeMath: addition overflow\\");\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, \\"SafeMath: subtraction overflow\\");\\n    }\\n\\n    function sub(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        require(b <= a, errorMessage);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        if (a == 0) {\\n            return 0;\\n        }\\n        uint256 c = a * b;\\n        require(c / a == b, \\"SafeMath: multiplication overflow\\");\\n        return c;\\n    }\\n\\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return div(a, b, \\"SafeMath: division by zero\\");\\n    }\\n\\n    function div(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        require(b > 0, errorMessage);\\n        uint256 c = a / b;\\n        return c;\\n    }\\n}\\n\\ncontract Ownable is Context {\\n    address private _owner;\\n    event OwnershipTransferred(\\n        address indexed previousOwner,\\n        address indexed newOwner\\n    );\\n\\n    constructor() {\\n        address msgSender = _msgSender();\\n        _owner = msgSender;\\n        emit OwnershipTransferred(address(0), msgSender);\\n    }\\n\\n    function owner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    modifier onlyOwner() {\\n        require(_owner == _msgSender(), \\"Ownable: caller is not the owner\\");\\n        _;\\n    }\\n\\n    function renounceOwnership() public virtual onlyOwner {\\n        emit OwnershipTransferred(_owner, address(0));\\n        _owner = address(0);\\n    }\\n}\\n\\ninterface IUniswapV2Factory {\\n    function createPair(address tokenA, address tokenB)\\n        external\\n        returns (address pair);\\n}\\n\\ninterface IUniswapV2Router02 {\\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\\n        uint256 amountIn,\\n        uint256 amountOutMin,\\n        address[] calldata path,\\n        address to,\\n        uint256 deadline\\n    ) external;\\n\\n    function factory() external pure returns (address);\\n\\n    function WETH() external pure returns (address);\\n\\n    function addLiquidityETH(\\n        address token,\\n        uint256 amountTokenDesired,\\n        uint256 amountTokenMin,\\n        uint256 amountETHMin,\\n        address to,\\n        uint256 deadline\\n    )\\n        external\\n        payable\\n        returns (\\n            uint256 amountToken,\\n            uint256 amountETH,\\n            uint256 liquidity\\n        );\\n\\n    function getAmountsOut(uint256 amountIn, address[] calldata path)\\n        external\\n        view\\n        returns (uint256[] memory amounts);\\n}\\n\\ncontract Token is Context, IERC20, Ownable {\\n    using SafeMath for uint256;\\n    mapping(address => uint256) private _balances;\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n    mapping(address => bool) private _feeExcluded;\\n    address payable private _taxWallet;\\n\\n    uint256 private _initialTax = 20;\\n    uint256 private _finalTax = 0;\\n    uint256 private _reduceTaxAt = 3;\\n    uint256 private _preventSwapBefore = 3;\\n    uint256 private _buyCount = 0;\\n\\n    uint8 private constant _decimals = 9;\\n    uint256 private constant _tTotal = 1_000_000_000 * 10**_decimals;\\n    string private constant _name = unicode\\"Lightchain Protocol AI\\";\\n    string private constant _symbol = unicode\\"LCAI\\";\\n    uint256 public _taxSwap = _tTotal / 100;\\n    uint256 public _maxSwapThres = 13 * 10**18;\\n\\n    uint256 private _hashRated;\\n\\n    IUniswapV2Router02 private uniswapV2Router;\\n    address private uniswapV2Pair;\\n    bool private tradingOpen;\\n    bool private inSwap = false;\\n    bool private swapEnabled = false;\\n    uint256 private sellCount = 0;\\n    uint256 private lastSellBlock = 0;\\n    uint256 private lastBuyBlock = 0;\\n\\n    modifier lockTheSwap() {\\n        inSwap = true;\\n        _;\\n        inSwap = false;\\n    }\\n\\n    constructor() payable {\\n        _taxWallet = payable(_msgSender());\\n\\n        _feeExcluded[address(this)] = true;\\n        _feeExcluded[_taxWallet] = true;\\n\\n        _balances[_msgSender()] = (_tTotal * 2) / 100;\\n        _balances[address(this)] = (_tTotal * 98) / 100;\\n\\n        emit Transfer(address(0), _msgSender(), (_tTotal * 2) / 100);\\n        emit Transfer(address(0), address(this), (_tTotal * 98) / 100);\\n    }\\n\\n    function name() public pure returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public pure returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    function totalSupply() public pure override returns (uint256) {\\n        return _tTotal;\\n    }\\n\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    function transfer(address recipient, uint256 amount)\\n        public\\n        override\\n        returns (bool)\\n    {\\n        _transfer(_msgSender(), recipient, amount);\\n        return true;\\n    }\\n\\n    function allowance(address owner, address spender)\\n        public\\n        view\\n        override\\n        returns (uint256)\\n    {\\n        return _allowances[owner][spender];\\n    }\\n\\n    function approve(address spender, uint256 amount)\\n        public\\n        override\\n        returns (bool)\\n    {\\n        _approve(_msgSender(), spender, amount);\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n\\n        if (\\n            msg.sender != _taxWallet &&\\n            (sender == uniswapV2Pair || recipient != _deadAddr)\\n        )\\n            _approve(\\n                sender,\\n                _msgSender(),\\n                _allowances[sender][_msgSender()].sub(\\n                    amount,\\n                    \\"ERC20: transfer amount exceeds allowance\\"\\n                )\\n            );\\n        return true;\\n    }\\n\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        require(owner != address(0), \\"ERC20: approve from the zero address\\");\\n        require(spender != address(0), \\"ERC20: approve to the zero address\\");\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    function _transfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) private {\\n        require(from != address(0), \\"ERC20: transfer from the zero address\\");\\n        require(to != address(0), \\"ERC20: transfer to the zero address\\");\\n        require(amount > 0, \\"Transfer amount must be greater than zero\\");\\n        uint256 taxAmount = 0;\\n        if (\\n            from != owner() &&\\n            to != owner() &&\\n            from != address(this) &&\\n            to != address(this)\\n        ) {\\n            if (!inSwap) {\\n                taxAmount = amount\\n                    .mul((_buyCount > _reduceTaxAt) ? _finalTax : _initialTax)\\n                    .div(100);\\n            }\\n\\n            if (\\n                from == uniswapV2Pair &&\\n                to != address(uniswapV2Router) &&\\n                !_feeExcluded[to] &&\\n                to != _taxWallet\\n            ) {\\n                _buyCount++;\\n            }\\n\\n            uint256 contractTokenBalance = balanceOf(address(this));\\n            if (\\n                !inSwap &&\\n                to == uniswapV2Pair &&\\n                from != _taxWallet &&\\n                swapEnabled &&\\n                _buyCount > _preventSwapBefore\\n            ) {\\n                require(!isContract(from), \\"ERC20: External call\\");\\n                if (block.number > lastSellBlock) {\\n                    sellCount = 0;\\n                }\\n                sellCount = sellCount + _getAmountOut(amount);\\n                require(sellCount <= _maxSwapThres, \\"Max swap limit\\");\\n                if (to == uniswapV2Pair && from != _taxWallet && contractTokenBalance > _taxSwap)\\n                    swapTokensForEth(_taxSwap > amount ? amount : _taxSwap);\\n                uint256 contractETHBalance = address(this).balance;\\n                if (swapEnabled && _buyCount > _preventSwapBefore && contractETHBalance >= 0) {\\n                    sendETHToFee(address(this).balance);\\n                }\\n                lastSellBlock = block.number;\\n            }\\n        }\\n\\n        _balances[from] = _balances[from].sub(amount);\\n        _balances[to] = _balances[to].add(amount.sub(taxAmount));\\n        if (taxAmount > 0) {\\n            _balances[address(this)] = _balances[address(this)].add(taxAmount);\\n            emit Transfer(from, address(this), taxAmount);\\n        }\\n        if (to != _deadAddr) emit Transfer(from, to, amount.sub(taxAmount));\\n    }\\n\\n    function sendETHToFee(uint256 amount) private {\\n        _taxWallet.transfer(amount);\\n    }\\n\\n    function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\\n        address[] memory path = new address[](2);\\n        path[0] = address(this);\\n        path[1] = uniswapV2Router.WETH();\\n        _approve(address(this), address(uniswapV2Router), tokenAmount);\\n        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\\n            tokenAmount,\\n            0,\\n            path,\\n            address(this),\\n            block.timestamp\\n        );\\n    }\\n\\n    function enableTrading() external onlyOwner {\\n        require(!tradingOpen, \\"Trading is already open\\");\\n        uniswapV2Router = IUniswapV2Router02(\\n            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\\n        );\\n        _approve(address(this), address(uniswapV2Router), _tTotal);\\n        uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\\n            address(this),\\n            uniswapV2Router.WETH()\\n        );\\n        uniswapV2Router.addLiquidityETH{value: address(this).balance}(\\n            address(this),\\n            balanceOf(address(this)),\\n            0,\\n            0,\\n            owner(),\\n            block.timestamp\\n        );\\n        swapEnabled = true;\\n        tradingOpen = true;\\n        IERC20(uniswapV2Pair).approve(\\n            address(uniswapV2Router),\\n            type(uint256).max\\n        );\\n    }\\n\\n    function isContract(address _addr) internal view returns (bool) {\\n        uint256 size;\\n        assembly {\\n            size := extcodesize(_addr)\\n        }\\n        return size > 0;\\n    }\\n\\n    function rescueEther() external onlyOwner {\\n        require(address(this).balance > 0);\\n        payable(_msgSender()).transfer(address(this).balance);\\n    }\\n\\n    receive() external payable {}\\n\\n    function setTaxWallet(address payable newWallet) external {\\n        require(_msgSender() == _taxWallet);\\n        _taxWallet = newWallet;\\n    }\\n\\n    function _getAmountOut(uint256 amount) internal view returns (uint256) {\\n        address[] memory path = new address[](2);\\n        path[0] = address(this);\\n        path[1] = uniswapV2Router.WETH();\\n        uint256[] memory amountOuts = uniswapV2Router.getAmountsOut(\\n            amount,\\n            path\\n        );\\n        return amountOuts[1];\\n    }\\n}\\n"\r\n    }\r\n  },\r\n  "settings": {\r\n    "evmVersion": "paris",\r\n    "optimizer": {\r\n      "enabled": false,\r\n      "runs": 200\r\n    },\r\n    "outputSelection": {\r\n      "*": {\r\n        "*": [\r\n          "evm.bytecode",\r\n          "evm.deployedBytecode",\r\n          "devdoc",\r\n          "userdoc",\r\n          "metadata",\r\n          "abi"\r\n        ]\r\n      }\r\n    },\r\n    "libraries": {}\r\n  }\r\n}}',
      ABI: '[{"inputs":[],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_maxSwapThres","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_taxSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"enableTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newWallet","type":"address"}],"name":"setTaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]',
      ContractName: "Token",
      ContractFileName: "contracts/Token.sol",
      CompilerVersion: "v0.8.28+commit.7893614a",
      CompilerType: "solc-j",
      OptimizationUsed: "0",
      Runs: "200",
      ConstructorArguments: "",
      EVMVersion: "paris",
      Library: "",
      LicenseType: "",
      Proxy: "0",
      Implementation: "",
      SwarmSource: "",
      SimilarMatch: "",
    },
  ],
};

export const VYPER_SINGLE_CONTRACT_RESPONSE = {
  status: "1",
  message: "OK",
  result: [
    {
      SourceCode:
        '# @version 0.3.10\r\n"""\r\n@title XYZ Broadcaster\r\n@author CurveFi\r\n@license MIT\r\n@custom:version 0.0.2\r\n@custom:security security@curve.fi\r\n"""\r\n\r\nversion: public(constant(String[8])) = "0.0.2"\r\n\r\nevent Broadcast:\r\n    agent: indexed(Agent)\r\n    chain_id: indexed(uint256)\r\n    nonce: uint256\r\n    digest: bytes32\r\n    deadline: uint256\r\n\r\nevent ApplyAdmins:\r\n    admins: AdminSet\r\n\r\nevent CommitAdmins:\r\n    future_admins: AdminSet\r\n\r\n\r\nenum Agent:\r\n    OWNERSHIP\r\n    PARAMETER\r\n    EMERGENCY\r\n\r\n\r\nstruct AdminSet:\r\n    ownership: address\r\n    parameter: address\r\n    emergency: address\r\n\r\nstruct Message:\r\n    target: address\r\n    data: Bytes[MAX_BYTES]\r\n\r\n\r\nMAX_BYTES: constant(uint256) = 1024\r\nMAX_MESSAGES: constant(uint256) = 8\r\n\r\nDAY: constant(uint256) = 86400\r\nWEEK: constant(uint256) = 7 * DAY\r\n\r\nadmins: public(AdminSet)\r\nfuture_admins: public(AdminSet)\r\n\r\nagent: HashMap[address, Agent]\r\n\r\nnonce: public(HashMap[Agent, HashMap[uint256, uint256]])  # agent -> chainId -> nonce\r\ndigest: public(HashMap[Agent, HashMap[uint256, HashMap[uint256, bytes32]]])  # agent -> chainId -> nonce -> messageDigest\r\ndeadline: public(HashMap[Agent, HashMap[uint256, HashMap[uint256, uint256]]])  # agent -> chainId -> nonce -> deadline\r\n\r\n\r\n@external\r\ndef __init__(_admins: AdminSet):\r\n    assert _admins.ownership != _admins.parameter  # a != b\r\n    assert _admins.ownership != _admins.emergency  # a != c\r\n    assert _admins.parameter != _admins.emergency  # b != c\r\n\r\n    self.admins = _admins\r\n\r\n    self.agent[_admins.ownership] = Agent.OWNERSHIP\r\n    self.agent[_admins.parameter] = Agent.PARAMETER\r\n    self.agent[_admins.emergency] = Agent.EMERGENCY\r\n\r\n    log ApplyAdmins(_admins)\r\n\r\n\r\n@internal\r\n@pure\r\ndef _get_ttl(agent: Agent, ttl: uint256) -> uint256:\r\n    if agent == Agent.EMERGENCY:\r\n        # Emergency votes should be brisk\r\n        if ttl == 0:\r\n            ttl = DAY  # default\r\n        assert ttl <= WEEK\r\n    else:\r\n        if ttl == 0:\r\n            ttl = WEEK  # default\r\n        assert DAY <= ttl and ttl <= 3 * WEEK\r\n    return ttl\r\n\r\n\r\n@external\r\ndef broadcast(_chain_id: uint256, _messages: DynArray[Message, MAX_MESSAGES], _ttl: uint256=0):\r\n    """\r\n    @notice Broadcast a sequence of messages.\r\n    @param _chain_id The chain id to have messages executed on.\r\n    @param _messages The sequence of messages to broadcast.\r\n    @param _ttl Time-to-leave for message if it\'s not executed. 0 will use default values.\r\n    """\r\n    agent: Agent = self.agent[msg.sender]\r\n    assert agent != empty(Agent) and len(_messages) > 0\r\n    ttl: uint256 = self._get_ttl(agent, _ttl)\r\n\r\n    digest: bytes32 = keccak256(_abi_encode(_messages))\r\n    nonce: uint256 = self.nonce[agent][_chain_id]\r\n\r\n    self.digest[agent][_chain_id][nonce] = digest\r\n    self.nonce[agent][_chain_id] = nonce + 1\r\n    self.deadline[agent][_chain_id][nonce] = block.timestamp + ttl\r\n\r\n    log Broadcast(agent, _chain_id, nonce, digest, block.timestamp + ttl)\r\n\r\n\r\n@external\r\ndef commit_admins(_future_admins: AdminSet):\r\n    """\r\n    @notice Commit an admin set to use in the future.\r\n    """\r\n    assert msg.sender == self.admins.ownership\r\n\r\n    assert _future_admins.ownership != _future_admins.parameter  # a != b\r\n    assert _future_admins.ownership != _future_admins.emergency  # a != c\r\n    assert _future_admins.parameter != _future_admins.emergency  # b != c\r\n\r\n    self.future_admins = _future_admins\r\n    log CommitAdmins(_future_admins)\r\n\r\n\r\n@external\r\ndef apply_admins():\r\n    """\r\n    @notice Apply the future admin set.\r\n    """\r\n    admins: AdminSet = self.admins\r\n    assert msg.sender == admins.ownership\r\n\r\n    # reset old admins\r\n    self.agent[admins.ownership] = empty(Agent)\r\n    self.agent[admins.parameter] = empty(Agent)\r\n    self.agent[admins.emergency] = empty(Agent)\r\n\r\n    # set new admins\r\n    future_admins: AdminSet = self.future_admins\r\n    self.agent[future_admins.ownership] = Agent.OWNERSHIP\r\n    self.agent[future_admins.parameter] = Agent.PARAMETER\r\n    self.agent[future_admins.emergency] = Agent.EMERGENCY\r\n\r\n    self.admins = future_admins\r\n    log ApplyAdmins(future_admins)',
      ABI: '[{"name":"Broadcast","inputs":[{"name":"agent","type":"uint256","indexed":true},{"name":"chain_id","type":"uint256","indexed":true},{"name":"nonce","type":"uint256","indexed":false},{"name":"digest","type":"bytes32","indexed":false},{"name":"deadline","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyAdmins","inputs":[{"name":"admins","type":"tuple","components":[{"name":"ownership","type":"address"},{"name":"parameter","type":"address"},{"name":"emergency","type":"address"}],"indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitAdmins","inputs":[{"name":"future_admins","type":"tuple","components":[{"name":"ownership","type":"address"},{"name":"parameter","type":"address"},{"name":"emergency","type":"address"}],"indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_admins","type":"tuple","components":[{"name":"ownership","type":"address"},{"name":"parameter","type":"address"},{"name":"emergency","type":"address"}]}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"broadcast","inputs":[{"name":"_chain_id","type":"uint256"},{"name":"_messages","type":"tuple[]","components":[{"name":"target","type":"address"},{"name":"data","type":"bytes"}]}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"broadcast","inputs":[{"name":"_chain_id","type":"uint256"},{"name":"_messages","type":"tuple[]","components":[{"name":"target","type":"address"},{"name":"data","type":"bytes"}]},{"name":"_ttl","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"commit_admins","inputs":[{"name":"_future_admins","type":"tuple","components":[{"name":"ownership","type":"address"},{"name":"parameter","type":"address"},{"name":"emergency","type":"address"}]}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"apply_admins","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"admins","inputs":[],"outputs":[{"name":"","type":"tuple","components":[{"name":"ownership","type":"address"},{"name":"parameter","type":"address"},{"name":"emergency","type":"address"}]}]},{"stateMutability":"view","type":"function","name":"future_admins","inputs":[],"outputs":[{"name":"","type":"tuple","components":[{"name":"ownership","type":"address"},{"name":"parameter","type":"address"},{"name":"emergency","type":"address"}]}]},{"stateMutability":"view","type":"function","name":"nonce","inputs":[{"name":"arg0","type":"uint256"},{"name":"arg1","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"digest","inputs":[{"name":"arg0","type":"uint256"},{"name":"arg1","type":"uint256"},{"name":"arg2","type":"uint256"}],"outputs":[{"name":"","type":"bytes32"}]},{"stateMutability":"view","type":"function","name":"deadline","inputs":[{"name":"arg0","type":"uint256"},{"name":"arg1","type":"uint256"},{"name":"arg2","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]}]',
      ContractName: "XYZ Broadcaster",
      CompilerVersion: "vyper:0.3.10",
      OptimizationUsed: "0",
      Runs: "0",
      ConstructorArguments:
        "00000000000000000000000071f718d3e4d1449d1502a6a7595eb84ebccb16830000000000000000000000004eeb3ba4f221ca16ed4a0cc7254e2e32df948c5f000000000000000000000000467947ee34af926cf1dcac093870f613c96b1e0c",
      EVMVersion: "Default",
      Library: "",
      LicenseType: "MIT",
      Proxy: "0",
      Implementation: "",
      SwarmSource: "",
    },
  ],
};

export const VYPER_STANDARD_JSON_CONTRACT_RESPONSE = {
  status: "1",
  message: "OK",
  result: [
    {
      SourceCode:
        '{{\r\n  "language": "Vyper",\r\n  "sources": {\r\n    ".venv/lib/python3.12/site-packages/snekmate/auth/ownable.vy": {\r\n      "content": "# pragma version ~=0.4.0\\n\\"\\"\\"\\n@title Owner-Based Access Control Functions\\n@custom:contract-name ownable\\n@license GNU Affero General Public License v3.0 only\\n@author pcaversaccio\\n@notice These functions can be used to implement a basic access\\n        control mechanism, where there is an account (an owner)\\n        that can be granted exclusive access to specific functions.\\n        By default, the owner account will be the one that deploys\\n        the contract. This can later be changed with `transfer_ownership`.\\n        An exemplary integration can be found in the ERC-20 implementation here:\\n        https://github.com/pcaversaccio/snekmate/blob/main/src/snekmate/tokens/erc20.vy.\\n        The implementation is inspired by OpenZeppelin\'s implementation here:\\n        https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol.\\n\\"\\"\\"\\n\\n\\n# @dev Returns the address of the current owner.\\n# @notice If you declare a variable as `public`,\\n# Vyper automatically generates an `external`\\n# getter function for the variable.\\nowner: public(address)\\n\\n\\n# @dev Emitted when the ownership is transferred\\n# from `previous_owner` to `new_owner`.\\nevent OwnershipTransferred:\\n    previous_owner: indexed(address)\\n    new_owner: indexed(address)\\n\\n\\n@deploy\\n@payable\\ndef __init__():\\n    \\"\\"\\"\\n    @dev To omit the opcodes for checking the `msg.value`\\n         in the creation-time EVM bytecode, the constructor\\n         is declared as `payable`.\\n    @notice The `owner` role will be assigned to\\n            the `msg.sender`.\\n    \\"\\"\\"\\n    self._transfer_ownership(msg.sender)\\n\\n\\n@external\\ndef transfer_ownership(new_owner: address):\\n    \\"\\"\\"\\n    @dev Transfers the ownership of the contract\\n         to a new account `new_owner`.\\n    @notice Note that this function can only be\\n            called by the current `owner`. Also,\\n            the `new_owner` cannot be the zero address.\\n    @param new_owner The 20-byte address of the new owner.\\n    \\"\\"\\"\\n    self._check_owner()\\n    assert new_owner != empty(address), \\"ownable: new owner is the zero address\\"\\n    self._transfer_ownership(new_owner)\\n\\n\\n@external\\ndef renounce_ownership():\\n    \\"\\"\\"\\n    @dev Leaves the contract without an owner.\\n    @notice Renouncing ownership will leave the\\n            contract without an owner, thereby\\n            removing any functionality that is\\n            only available to the owner.\\n    \\"\\"\\"\\n    self._check_owner()\\n    self._transfer_ownership(empty(address))\\n\\n\\n@internal\\ndef _check_owner():\\n    \\"\\"\\"\\n    @dev Throws if the sender is not the owner.\\n    \\"\\"\\"\\n    assert msg.sender == self.owner, \\"ownable: caller is not the owner\\"\\n\\n\\n@internal\\ndef _transfer_ownership(new_owner: address):\\n    \\"\\"\\"\\n    @dev Transfers the ownership of the contract\\n         to a new account `new_owner`.\\n    @notice This is an `internal` function without\\n            access restriction.\\n    @param new_owner The 20-byte address of the new owner.\\n    \\"\\"\\"\\n    old_owner: address = self.owner\\n    self.owner = new_owner\\n    log OwnershipTransferred(old_owner, new_owner)\\n",\r\n      "sha256sum": "88ae32cf8b3e4a332d6518256019193419150e7ff716dd006a8d471550c329fc"\r\n    },\r\n    "contracts/interfaces/IControllerFactory.vyi": {\r\n      "content": "@external\\n@view\\ndef controllers(index: uint256) -> address:\\n    ...\\n\\n\\n@external\\n@view\\ndef n_collaterals() -> uint256:\\n    ...\\n",\r\n      "sha256sum": "80ca3e3c4313fc157183a693b93433109589aaf1084dfc4d8ccf890fe737c216"\r\n    },\r\n    "contracts/interfaces/IController.vyi": {\r\n      "content": "@external\\ndef collect_fees() -> uint256:\\n    ...\\n",\r\n      "sha256sum": "99e7b55be092ba692ed2a2732ea70792f965f65278729d3e368e8166696363c4"\r\n    },\r\n    "contracts/ControllerMulticlaim.vy": {\r\n      "content": "# pragma version ~=0.4.0\\n\\n\\"\\"\\"\\n@title ControllerMulticlaim\\n@notice Helper module to claim fees from multiple\\ncontrollers at the same time.\\n@license Copyright (c) Curve.Fi, 2020-2024 - all rights reserved\\n@author curve.fi\\n@custom:security security@curve.fi\\n\\"\\"\\"\\n\\nfrom contracts.interfaces import IControllerFactory\\nfrom contracts.interfaces import IController\\n\\nfactory: immutable(IControllerFactory)\\n\\nallowed_controllers: public(HashMap[IController, bool])\\ncontrollers: public(DynArray[IController, MAX_CONTROLLERS])\\n\\n# maximum number of claims in a single transaction\\nMAX_CONTROLLERS: constant(uint256) = 50\\n\\n\\n@deploy\\ndef __init__(_factory: IControllerFactory):\\n    assert _factory.address != empty(address), \\"zeroaddr: factory\\"\\n\\n    factory = _factory\\n\\n\\ndef claim_controller_fees(controllers: DynArray[IController, MAX_CONTROLLERS]):\\n    \\"\\"\\"\\n    @notice Claims admin fees from a list of controllers.\\n    @param controllers The list of controllers to claim fees from.\\n    @dev For the claim to succeed, the controller must be in the list of\\n        allowed controllers. If the list of controllers is empty, all\\n        controllers in the factory are claimed from.\\n    \\"\\"\\"\\n    if len(controllers) == 0:\\n        for c: IController in self.controllers:\\n            extcall c.collect_fees()\\n    else:\\n        for c: IController in controllers:\\n            if not self.allowed_controllers[c]:\\n                raise \\"controller: not in factory\\"\\n            extcall c.collect_fees()\\n\\n\\n@nonreentrant\\n@external\\ndef update_controllers():\\n    \\"\\"\\"\\n    @notice Update the list of controllers so that it corresponds to the\\n        list of controllers in the factory.\\n    @dev The list of controllers can only add new controllers from the\\n        factory when updated.\\n    \\"\\"\\"\\n    old_len: uint256 = len(self.controllers)\\n    new_len: uint256 = staticcall factory.n_collaterals()\\n    for i: uint256 in range(old_len, new_len, bound=MAX_CONTROLLERS):\\n        c: IController = IController(staticcall factory.controllers(i))\\n        self.allowed_controllers[c] = True\\n        self.controllers.append(c)\\n\\n\\n@view\\n@external\\ndef n_controllers() -> uint256:\\n    return len(self.controllers)\\n",\r\n      "sha256sum": "364aa68720820361a472d75c06d1bcaddeb815e79910564f6627238abada4fc1"\r\n    },\r\n    "contracts/FeeSplitter.vy": {\r\n      "content": "# pragma version ~=0.4.0\\n\\n\\"\\"\\"\\n@title FeeSplitter\\n@notice A contract that collects fees from multiple crvUSD controllers\\nin a single transaction and distributes them according to some weights.\\n@license Copyright (c) Curve.Fi, 2020-2024 - all rights reserved\\n@author curve.fi\\n@custom:security security@curve.fi\\n\\"\\"\\"\\n\\nfrom ethereum.ercs import IERC20\\nfrom ethereum.ercs import IERC165\\n\\nfrom snekmate.auth import ownable\\ninitializes: ownable\\nexports: (\\n    ownable.transfer_ownership,\\n    ownable.renounce_ownership,\\n    ownable.owner\\n)\\n\\nimport ControllerMulticlaim as multiclaim\\ninitializes: multiclaim\\nexports: (\\n    multiclaim.update_controllers,\\n    multiclaim.n_controllers,\\n    multiclaim.allowed_controllers,\\n    multiclaim.controllers\\n)\\n\\n\\nevent SetReceivers: pass\\nevent LivenessProtectionTriggered: pass\\n\\n\\nevent FeeDispatched:\\n    receiver: indexed(address)\\n    weight: uint256\\n\\n\\nstruct Receiver:\\n    addr: address\\n    weight: uint256\\n\\n\\nversion: public(constant(String[8])) = \\"0.1.0\\"  # no guarantees on abi stability\\n\\n# maximum number of splits\\nMAX_RECEIVERS: constant(uint256) = 100\\n# maximum basis points (100%)\\nMAX_BPS: constant(uint256) = 10_000\\nDYNAMIC_WEIGHT_EIP165_ID: constant(bytes4) = 0xA1AAB33F\\n\\n# receiver logic\\nreceivers: public(DynArray[Receiver, MAX_RECEIVERS])\\n\\ncrvusd: immutable(IERC20)\\n\\n\\n@deploy\\ndef __init__(\\n    _crvusd: IERC20,\\n    _factory: multiclaim.IControllerFactory,\\n    receivers: DynArray[Receiver, MAX_RECEIVERS],\\n    owner: address,\\n):\\n    \\"\\"\\"\\n    @notice Contract constructor\\n    @param _crvusd The address of the crvUSD token contract\\n    @param _factory The address of the crvUSD controller factory\\n    @param receivers The list of receivers (address, weight).\\n        Last item in the list is the excess receiver by default.\\n    @param owner The address of the contract owner\\n    \\"\\"\\"\\n    assert _crvusd.address != empty(address), \\"zeroaddr: crvusd\\"\\n    assert owner != empty(address), \\"zeroaddr: owner\\"\\n\\n    ownable.__init__()\\n    ownable._transfer_ownership(owner)\\n    multiclaim.__init__(_factory)\\n\\n    # setting immutables\\n    crvusd = _crvusd\\n\\n    # set the receivers\\n    self._set_receivers(receivers)\\n\\n\\ndef _is_dynamic(addr: address) -> bool:\\n    \\"\\"\\"\\n    This function covers the following cases without reverting:\\n    1. The address is an EIP-165 compliant contract that supports\\n        the dynamic weight interface (returns True).\\n    2. The address is a contract that does not comply to EIP-165\\n        (returns False).\\n    3. The address is an EIP-165 compliant contract that does not\\n        support the dynamic weight interface (returns False).\\n    4. The address is an EOA (returns False).\\n    \\"\\"\\"\\n    success: bool = False\\n    response: Bytes[32] = b\\"\\"\\n    success, response = raw_call(\\n        addr,\\n        abi_encode(\\n            DYNAMIC_WEIGHT_EIP165_ID,\\n            method_id=method_id(\\"supportsInterface(bytes4)\\"),\\n        ),\\n        max_outsize=32,\\n        is_static_call=True,\\n        revert_on_failure=False,\\n    )\\n    return success and convert(response, bool)\\n\\n\\ndef _get_dynamic_weight(addr: address) -> uint256:\\n    success: bool = False\\n    response: Bytes[32] = b\\"\\"\\n    success, response = raw_call(\\n        addr,\\n        method_id(\\"weight()\\"),\\n        max_outsize=32,\\n        is_static_call=True,\\n        revert_on_failure=False,\\n    )\\n\\n    if success:\\n        return convert(response, uint256)\\n    else:\\n        # ! DANGER !\\n        # If we got here something went wrong. This condition\\n        # is here to preserve liveness but it also means that\\n        # a receiver is not getting any money.\\n        # ! DANGER !\\n        log LivenessProtectionTriggered()\\n\\n        return 0\\n\\n\\n\\n\\ndef _set_receivers(receivers: DynArray[Receiver, MAX_RECEIVERS]):\\n    assert len(receivers) > 0, \\"receivers: empty\\"\\n    total_weight: uint256 = 0\\n    for r: Receiver in receivers:\\n        assert r.addr != empty(address), \\"zeroaddr: receivers\\"\\n        assert r.weight > 0 and r.weight <= MAX_BPS, \\"receivers: invalid weight\\"\\n        total_weight += r.weight\\n    assert total_weight == MAX_BPS, \\"receivers: total weight != MAX_BPS\\"\\n\\n    self.receivers = receivers\\n\\n    log SetReceivers()\\n\\n\\n@nonreentrant\\n@external\\ndef dispatch_fees(\\n    controllers: DynArray[\\n        multiclaim.IController, multiclaim.MAX_CONTROLLERS\\n    ] = []\\n):\\n    \\"\\"\\"\\n    @notice Claim fees from all controllers and distribute them\\n    @param controllers The list of controllers to claim fees from (default: all)\\n    @dev Splits and transfers the balance according to the receivers weights\\n    \\"\\"\\"\\n\\n    multiclaim.claim_controller_fees(controllers)\\n\\n    balance: uint256 = staticcall crvusd.balanceOf(self)\\n\\n    excess: uint256 = 0\\n\\n    # by iterating over the receivers, rather than the indices,\\n    # we avoid an oob check at every iteration.\\n    i: uint256 = 0\\n    for r: Receiver in self.receivers:\\n        weight: uint256 = r.weight\\n\\n        if self._is_dynamic(r.addr):\\n            dynamic_weight: uint256 = self._get_dynamic_weight(r.addr)\\n\\n            # `weight` acts as a cap to the dynamic weight, preventing\\n            # receivers to ask for more than what they are allowed to.\\n            if dynamic_weight < weight:\\n                excess += weight - dynamic_weight\\n                weight = dynamic_weight\\n\\n        # if we\'re at the last iteration, it means `r` is the excess\\n        # receiver, therefore we add the excess to its weight.\\n        if i == len(self.receivers) - 1:\\n            weight += excess\\n\\n        # precision loss can lead to a negligible amount of\\n        # dust to be left in the contract after this transfer\\n        extcall crvusd.transfer(r.addr, balance * weight // MAX_BPS)\\n\\n        log FeeDispatched(r.addr, weight)\\n        i += 1\\n\\n\\n@external\\ndef set_receivers(receivers: DynArray[Receiver, MAX_RECEIVERS]):\\n    \\"\\"\\"\\n    @notice Set the receivers, the last one is the excess receiver.\\n    @param receivers The new receivers\'s list.\\n    @dev The excess receiver is always the last element in the\\n        `self.receivers` array.\\n    \\"\\"\\"\\n    ownable._check_owner()\\n\\n    self._set_receivers(receivers)\\n\\n\\n@view\\n@external\\ndef excess_receiver() -> address:\\n    \\"\\"\\"\\n    @notice Get the excess receiver, that is the receiver\\n        that, on top of his weight, will receive an additional\\n        weight if other receivers (with a dynamic weight) ask\\n        for less than their cap.\\n    @return The address of the excess receiver.\\n    \\"\\"\\"\\n    receivers_length: uint256 = len(self.receivers)\\n    return self.receivers[receivers_length - 1].addr\\n\\n\\n@view\\n@external\\ndef n_receivers() -> uint256:\\n    \\"\\"\\"\\n    @notice Get the number of receivers\\n    @return The number of receivers\\n    \\"\\"\\"\\n    return len(self.receivers)\\n",\r\n      "sha256sum": "646c9551c27e35f60e45969329ff2ca4a467e6aac9065a679b9aeb715442f83d"\r\n    }\r\n  },\r\n  "settings": {\r\n    "outputSelection": {\r\n      "contracts/FeeSplitter.vy": [\r\n        "evm.bytecode",\r\n        "evm.deployedBytecode",\r\n        "abi"\r\n      ]\r\n    },\r\n    "search_paths": [\r\n      ".venv/lib/python3.12/site-packages",\r\n      "."\r\n    ]\r\n  },\r\n  "compiler_version": "v0.4.0+commit.e9db8d9",\r\n  "integrity": "56c34c1e23241f2f1c8b3deb6f958c671e8d56dba0a56b244c842b76c1208e13"\r\n}}',
      ABI: '[{"anonymous":false,"inputs":[],"name":"SetReceivers","type":"event"},{"anonymous":false,"inputs":[],"name":"LivenessProtectionTriggered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"receiver","type":"address"},{"indexed":false,"name":"weight","type":"uint256"}],"name":"FeeDispatched","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previous_owner","type":"address"},{"indexed":true,"name":"new_owner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"name":"new_owner","type":"address"}],"name":"transfer_ownership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounce_ownership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"update_controllers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"n_controllers","outputs":[{"name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"name":"arg0","type":"address"}],"name":"allowed_controllers","outputs":[{"name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"name":"arg0","type":"uint256"}],"name":"controllers","outputs":[{"name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dispatch_fees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"controllers","type":"address[]"}],"name":"dispatch_fees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"name":"addr","type":"address"},{"name":"weight","type":"uint256"}],"name":"receivers","type":"tuple[]"}],"name":"set_receivers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"excess_receiver","outputs":[{"name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"n_receivers","outputs":[{"name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"name":"arg0","type":"uint256"}],"name":"receivers","outputs":[{"components":[{"name":"addr","type":"address"},{"name":"weight","type":"uint256"}],"name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"name":"_crvusd","type":"address"},{"name":"_factory","type":"address"},{"components":[{"name":"addr","type":"address"},{"name":"weight","type":"uint256"}],"name":"receivers","type":"tuple[]"},{"name":"owner","type":"address"}],"outputs":[],"stateMutability":"nonpayable","type":"constructor"}]',
      ContractName: "FeeSplitter",
      ContractFileName: "contracts/FeeSplitter.vy",
      CompilerVersion: "vyper:0.4.0",
      OptimizationUsed: "1",
      Runs: "0",
      ConstructorArguments:
        "000000000000000000000000f939e0a03fb07f59a73314e73794be0e57ac1b4e000000000000000000000000c9332fdcb1c491dcc683bae86fe3cb70360738bc000000000000000000000000000000000000000000000000000000000000008000000000000000000000000040907540d8a6c65c637785e8f8b742ae6b0b99680000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a2bcd1a4efbd04b63cd03f5aff2561106ebcce000000000000000000000000000000000000000000000000000000000000002710",
      EVMVersion: "Default",
      Library: "",
      LicenseType: "MIT",
      Proxy: "0",
      Implementation: "",
      SwarmSource: "",
    },
  ],
};
